Object monitoring system in shared object space

ABSTRACT

The present invention relates to a system for monitoring an object space shared among plural applications. Objects stored in the shared space are registered for monitoring and the system receives data related to the registered objects that can be utilized to perform statistical analysis, for example, relating to the overall health of the applications.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.10/690,783, filed Oct. 21,2003, now abandoned.

BACKGROUND OF THE INVENTION

The present invention relates to a system for monitoring an object spaceshared among plural applications.

Computer hardware and storage media can only create, store, and processbinary information, i.e. information written using only two digits, “0”and “1”. A compact disc, for example, has a surface subdivided into tinysections that are either pitted (1) or not pitted (0) such that a lasercan detect the presence or absence of pits. Similarly, microprocessorshave inputs and outputs to which a reference voltage either is (1) or isnot (0) present. (Microprocessors repeatedly measure the voltage at eachinput and output at regular intervals, or cycles—hence the speed of aprocessor is expressed in cycles per second, or “Hertz.”) Accordingly,any computer program, as well as any data used in that computer program,must first be expressed in binary code for a computer to run the programor process the data.

Though binary code is conceptually simple, its use to performcomputerized tasks introduces two drawbacks. First, binary code is arelatively inefficient way to express information. As a simple example,the number “100” in decimal notation is expressed as “1100100” in binarycode, and therefore must at a minimum occupy seven “pits” on a compactdisc and/or occupy either a single input of a processor for seven cycles(if entered serially) or seven inputs for one cycle (if entered inparallel). In technical terms, the space that a piece of informationoccupies, or alternatively the number of time cycles a piece ofinformation occupies, is referred to in “bits.” That is to say, thenumber “100” is a 7-bit number because it takes seven digits to expressin binary code. The number “101” is also a 7-bit number, coded as1100101, as is every number between “64” (1000000) and “127” (1111111).

In computer applications, binary code is even more inefficient becausecomputerized information is, by convention, typically expressed inmultiples of 8 bits, e.g. 8-bit, 16-bit, 24-bit, etc. The reason forthis convention is that a computer processing or storage device has nophysical way of distinguishing when one number ends and another numberbegins. Accordingly, the convention is to write a program that specifiesthe bit-rate, i.e. the number of bits that each piece of data processedin the program will occupy. If a program is written in 8-bit code, forexample, every piece of data occupies eight bits, e.g. the number 0 iscoded as 00000000, the number 1 is coded as 00000001, and the number 255is coded as 11111111. In 8-bit code, therefore, every piece of data hasa value between 0 and 255 and every piece of data occupies 8 bits evenif it could theoretically be represented by a single bit. If a programrequires that any piece of data take on a value greater than 255, thebit-rate for the program must be increased incrementally to 16-bit,24-bit, etc. as appropriate.

A computer program operating in binary code may therefore use atremendous amount of storage space and processor cycles, particularlywhen graphics are involved. For example, a photographic quality image isoften coded at 24-bits for every pixel. If the image resolution is 2million pixels, as is common with today's digital cameras, each imagewould occupy 48 million bits, or 4 Megabytes, where a byte is defined as8 bits per byte (due to the convention of expressing binary code inmultiples of 8 bits). Manipulating that image would similarly require 48million cycles of processor time for each manipulation. The amount ofstorage space and processing time increases exponentially whenmanipulating video because the computer system must process and storemany such images every second. In addition, there are many othercomputer applications that are at least as intensive as imageprocessing. Applications of such intensity tend to slow considerably asdata is “bottlenecked” in the computer system.

One way of minimizing the impact of the inefficiency of binary code hasbeen to increase the amount of storage space and processing speed ofcomputers. For example, personal computers sold commercially today offerup to 300 gigabytes (300 billion bytes) of hard drive storage, 4gigabytes (4 billion bytes) of temporary memory storage, and processingspeeds of over 4 gigahertz (4 billion cycles per second). Businesscomputers, such those used in the motion picture industry are evenfaster and include more storage. In other words, as computerapplications have demanded more storage space and processing time, thecomputers have become faster with higher storage capacity. Still, whilethese numbers are impressive, computer systems are not sufficiently fastas to eliminate all bottlenecks, and in fact, as computers become fasterwith more available storage, new applications are developed to takeadvantage of the improved technology so as to provide the need for evenfaster computers, even more storage space, etc.

Another way of minimizing the impact of the inefficiency of binary codeis to write computer programs and applications as efficiently aspossible. Thus there is always an emphasis on writing computer code thatachieves its outcome in as few steps or calculations as possible.Similarly, a computer program should not be written in 24-bit code whenonly 8-bit code is required for the application, and the computerprogram may compress data when appropriate.

A second drawback of using binary code to perform computerized tasks isthat it is impractical to write a computer program in binary code,particularly with complex programs. The first rudimentary computers, forexample, were operated by mechanically toggling electrical switchesbetween on and off states to enter a sequence of binary instructions.Computer programs simply specified the sequence of binary instructionsto enter. This method was feasible so long as the program was no morethan about a hundred instructions long. Beyond that point, programmingdirectly in binary code became too complex, and programs too difficultto correct, or debug. Moreover, because the binary instructions weredependent upon the particular electrical circuitry of the computerprocessor and related hardware, the programmer was required to know indetail the particular architecture of the computer being used by theprogram.

To accommodate computer programs of increasing complexity, as well as tofacilitate the introduction of personal computers into the marketplace,modern operating systems were developed. Early computer operatingsystems, such as Microsoft DOS, essentially acted as an interface with acomputer's hardware so that a user could issue specific commands orinstructions to the computer written in more ordinary language. Theoperating system would recognize the commands, and automatically issuethe instructions to the computer in binary code. For example, inMicrosoft DOS, entering the command “MEM” into the computer would resultin the computer displaying the types and amounts of computer memoryavailable. The person issuing the command did not need to know anythingabout binary code or the manner in which the command being enteredproduced the desired result. The user simply needed to either memorizeor look up a set of commands in an instruction manual.

Further, early operating systems recognized simple programminglanguages, such as BASIC and FORTRAN, written in terms more intuitivethan binary code. In these languages, commands such as WRITE, READ,LOOP, SET and other intuitive terms provided a means to write computerprograms in a manner easily learned and perhaps more importantly, in amanner more easily readable when debugging the program. A simplecomputer program to calculate the area of a circle, for example, mighthave been written in BASIC approximately in this form:

-   1 10 PROGRAM 1 20 WRITE “This is a program to calculate the area of    a circle.” 30 WRITE “Please enter the radius of the circle” 40 READ    R 50 SET A=.PI. *R{circumflex over ( )}2 60 WRITE “The area of the    circle is” R 70 END

In this example, after a person typed “RUN PROGRAM 1”, the computerwould execute the command lines in numerical sequence, whereby a personwould be prompted to enter the value for a radius, defined as “R”, afterwhich the computer would square that value, multiply the squared valueby pi and print out the computed area. Writing this same program inbinary code not only would have required much more time and effort onthe part of the programmer, but the programmer also would have had toknow the technical specifications of the computer processor. Obviously,the introduction of operating systems along with intuitive programminglanguages was a boon to both consumers and computer programmers.

A number of such operating systems and programming languages becameprevalent. For example, Apple Macintosh and Microsoft Windows operatingsystems improved (from a consumer's perspective) upon simple text-basedoperating systems such as DOS by allowing user to issue instructions tothe computer using a point-and-click graphical interface displayed on acomputer monitor. Computer applications, such as word processingprograms, computer games, and a host of others took advantage of thisfunctionality to provide products that could be used more intuitivelythrough the graphical interface. Today, a host of operating systems areused, such as many versions of Microsoft Windows 9x, Macintosh OS,Linux, Windows NT, among others.

A wide variety of programming languages also became prevalent. At first,most new programming languages followed the model of the early FORTRANlanguage by structuring the programming language as a series of commandsby which a programmer would issue instructions to a computer in alogical order. The most popular of these language types is a programcalled “C.” The creation of “C” is considered by many to have marked thebeginning of the modern age of computer languages. “C” successfullysynthesized what had seemed to be conflicting attributes of severalexisting programming languages, adding new attributes to form a single,powerful structured language that also happened to be easy to learn.Moreover, it was a programmer's language. Prior to the development of“C”, computer languages were generally designed either as academicexercises by engineers or designed by bureaucratic committees. “C”,however, was developed by programmers, reflecting the way theyapproached the task of programming. As a result, “C” found wide andrapid acceptance in the programming community, attracting many followerswho had near-religious zeal for it.

Once again, however, the increasing complexity of computer programsexposed an underlying flaw of “C” as well as its predecessors. Each ofthese programming languages requires that a program be written as aseries of linear steps or instructions (with an occasional loop orbranch thrown in). In fact, writing such a program is similar toconstructing a geometric proof, and like a proof, once a program such asC or FORTRAN exceeds a certain number of steps (somewhere between 25,000and 100,000 lines of code), the program becomes too complex writeeffectively.

Therefore a new approach to computer programming began to findacceptance in the programming community, commonly referred to asobject-oriented programming. Object-oriented programming approaches aprogramming task in roughly the same way that a person's mind mightapproach that task—by abstracting a solution. Rather than defining aseries of steps, or instructions by which a task could be accomplished,an object-oriented program focuses first on a program's data, definingclasses of data and objects, where an object is a particular instance ofa class. An object-oriented oriented program still containsinstructions, referred to as methods, which often are embedded withinthe classes or objects themselves. An example of a simple objectoriented program that displays the volume of two boxes might look likethis:

-   2 class Box {double width; double height; double depth; // display    volume of a box void volume ( ) {System.out.print (“Volume is”);    System.out.println (width*height*depth);}} class BoxDemo {public    static void main (String args[ ]{Box mybox1=new Box ( ); Box    mybox2=new Box ( ); // assign values to mybox 1's variables    mybox1.width=3 mybox1.height=20 mybox1.depth=15 // assign values to    mybox2's variables mybox 2.width=3 mybox2.height=6 mybox2.depth=9 //    display volume of mybox1 mybox1.volume ( ); // display volume of    mybox2 mybox2.volume ( )

In this example program, a box class is first defined having thevariables of width, height, and depth (the term “double” identifies thetype of number that the variable is allowed to be). The box class alsodefines a method to display the volume of an object box of this class bymultiplying width by height by depth. Once this class has been defined,the program defines a second class BoxDemo which includes two objects ofthe initial box class. The class BoxDemo then twice calls the method ofthe first box class for displaying the volume of a box, once to displaythe volume of mybox 1 and once to display the volume of mybox2.

Object oriented programming has quickly gained widespread popularity.One particularly popular object oriented language is called Java, whichis the programming language used in the foregoing example (Java is atrademark of Sun Microsystems Inc.). The reason Java has become sopopular is its versatility in defining classes and objects, as well asits ability for one class or object to call functions in other classesand objects as well as to reuse data in other objects simply byreferencing the function or the data. In Java, therefore, it is veryeasy to create multiple variations of a defined class, to create newvariations of an old class, and to reuse a method previously defined byone class in a new class. Parenthetically, another object orientedprogramming language that has become popular is C++, which expands C toinclude the functionality of both object oriented programming and theinstruction oriented programming of C.

Java, like any other programming language relies upon an interface toconvert the program to the required binary instructions. With Java, thisinterface is called a “Virtual Machine” (VM) because the interfacebehaves as if it were a computer unto itself. Every time a Java basedcomputer application is initiated, the application initiates a VM to runthe application. The Java VM will be described in much greater detaillater in this specification, but several important principles will beintroduced now. First, while the input to a Java VM is always the Javaprogramming language, the output of a Java VM is customized to theparticular platform, or operating system, that hosts the Java VM. Inother words, every Java application must be customized to the hostoperating system so that the VM that it creates is capable of convertingthe Java programming language to the commands unique to the hostoperating system, which in turn issues the appropriate binaryinstructions to the computer.

Second, Java VMs are designed to be independent of one another. If twoJava applications are running on the same computer, each applicationcreates its own VM which is self sufficient, i.e. neither VM needs relyupon the VM of the other application. If one application should close,the other application will not be affected. This often becomesproblematical, however. Recall that even with today's processors andstorage devices, a computer's resources may still be strained byintensive applications. With multiple Java applications runningsimultaneously, each creating its own VM, system resources may bestrained and slowdowns may result. In other words, there is often atrade off between the desired independence of multiple Java applicationsand the speed at which the applications may run.

Third, the creators of the Java VM, Sun Microsystems, emphasizeduniformity of the Java VM with respect to all of the host operatingsystems. Thus, while the “guts” of each VM will of necessity bedifferent across each platform, a user of a Java VM was not intended tobe able to recognize any difference, seeing the same functionalityregardless of the host platform. This, however, became problematical.Many operating systems offer unique features not available to otheroperating systems. Thus a business operating on Windows NT might desireto have a Java VM, and hence the Java application running the VM, takeadvantage of that unique functionality. The same would hold true for auser of a Macintosh or a Linux system, or a Windows 9x system, etc.Therefore, although Sun Microsystems's Java VM is uniform across allplatforms, an industry has blossomed by which Java applications may betruly customized to a host operating system whereby the features of thehost operating system are more fully exploited, and custom tailored tothe particular needs of the business or person running the application.

This diversity among Java VMs tends to hinder the improvement of theJava VM and the programming language because many such improvements aretied to the particular species of Java VM upon which the improvement wasdeveloped. Many businesses may like the particular improvement, butdislike other aspects of the Java VM. In that instance, a business withits own custom or proprietary VM would have the options of buying thenew VM with its perceived advantages and faults, or spend the time andresources to engineer its own VM, which it likes, to include the newimprovement. Exacerbating this problem is that the new improvement maybe proprietary, thus eliminating the second option.

What is desired then, is an improved system for implementingobject-oriented computer applications that both efficiently allocatescomputer hardware resources among multiple computer applications runningsimultaneously on the same computer or network of computers, or amongmultiple threads of a single computer application running on a computeror network of computers, while also preserving the independence ofmultiple, simultaneous applications. What is further desired is such animproved system that is sufficiently flexible so as to be compatible notonly with the diverse range of existing object-oriented computerapplications, but also with object-oriented applications that aredeveloped or modified in the future.

The foregoing and other objectives, features, and advantages of theinvention will be more readily understood upon consideration of thefollowing detailed description of the invention, taken in conjunctionwith the accompanying drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a simplified architectural schematic of an existing VM.

FIG. 2 is an expanded architectural schematic of the VM of FIG. 1showing a memory region interposed between the class loader and theexecution engine.

FIG. 3 is a schematic of the heap shown in FIG. 2.

FIG. 4A is a diagram showing a prior art system for operating multipleVM applications on a host computer.

FIG. 4B is a diagram showing a prior art system for the simultaneousoperation of multiple instances of a VM application on several hostcomputers connected through a network or internet server.

FIG. 5 is a diagram showing a first improved system for operatingmultiple VM applications on a host computer.

FIG. 6 is a diagram showing a first manner in which objects may beshared between applications using the system of FIG. 5

FIG. 7 is a diagram showing a second manner in which objects may beshared between applications using the system of FIG. 5

FIG. 8 is a second improved system for operating multiple VMapplications on a host computer.

FIG. 9 is an improved system for the simultaneous operation of multipleinstances of a VM application on several host computers connectedthrough a network or internet server.

FIGS. 10 and 11 show a system for monitoring a shared object space tocollect, store, graphically display, and analyze statistical or otherdata pertaining to the shared object space.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENT

FIGS. 1-4B show a simplified architectural schematic of an existingvirtual machine (VM) 10 as defined by Lindholm, Tim and Yellin, Frank(1999). THE JAVA VIRTUAL MACHINE SPECIFICATION, SECOND EDITION. Reading,Mass: Addison-Wesley. known as a JAVA virtual machine or Java VM,although it should be understood that other types of VMs besides Javamay also have the features shown in FIGS. 1-4B. Referring specificallyto FIG. 1, when a Java application is initiated on a host computer witha host operating system 12, the Java virtual machine (VM) 10 loads theapplication which may include a class loader 16 and an execution engine18. Although FIG. 1 indicates a single class loader, in actuality, aJava VM may include multiple class loaders. Thus the class loader 16 maybe considered a subsystem that may involve many class loaders. The JavaVM 10 has a flexible class loader architecture that enables a Javaapplication to load classes in custom ways.

Specifically, the class loader 16 may comprise a system class loader andone or more user-defined class loaders. The system class loader is apart of the Java VM implementation and loads classes, including the Javaapplication programming interface (API) class files 20, in some defaultway and usually from the local disk of the host computer. As previouslystated, the particular default manner in which the system class loaderloads classes is specific to the particular VM implementation being usedand may be customized. The term “system class loader” is sometimesreferred to as a “primordial class loader”, a “bootstrap class loader”,or a “default class loader.”

At run time, a Java application may also load application class files 22in custom ways through user-defined class loaders, such as bydownloading class files across a network. While the system class loaderis an intrinsic part of the VM implementation, the user-defined classloaders are not. Instead, user-defined class loaders are written inJava, compiled to class files, loaded into the virtual machine, andinstantiated just like any other object, becoming a part of theexecutable code of a running Java application. User defined classloaders enable a programmer to dynamically extend a Java application atrun time. As the application runs, it can determine what extra classesare needed and load them through one or more user-defined class loaders.Because the user defined class loaders are written in Java, classes canbe loaded in any manner expressible in the Java programming language.

For each class loaded by the virtual machine 10, the virtual machine 10records which class loader loaded the class. When a loaded class refersto another class, the virtual machine 10 requests the referenced classfrom the same class loader that originally loaded the referencing class.For example, if the virtual machine 10 loads the class “Volcano” througha particular class loader, it will attempt to load any classes to whichVolcano referred with the same class loader. In this way, Java'sarchitecture enables a programmer to create multiple “name spaces”inside a single Java application. Each class loader in the executingJava application has its own name space, which is populated by the namesof all the classes it has loaded.

The execution engine 18 executes instructions contained in the methodsof loaded classes in “bytecode”, essentially Java's machine language.The Java specification describes what is to result from a giveninstruction retrieved from a Java method, but a programmer of a Javaapplication determines the best way of achieving the result usingsoftware, hardware, or a combination of both. The execution engine 18 isan abstraction; Java is a programming language capable of simultaneouslyrunning multiple threads, i.e. distinct paths of execution, hence theexecution of each thread can be considered an “instance” of the abstractexecution engine 18. Thus at any given time, there may be multiple“instances” of the execution engine 18.

The execution engine 18 receives a bytecode stream of instructions in athread and executes the thread one instruction at a time. The executionengine 18 executes the actions requested by each thread, and wheneverintended by the Java application, sends instructions to the operatingsystem in the code that the operating system recognizes. From time totime, the execution engine 18 might encounter an instruction thatrequests a method written in some other language than Java, referred toas a “native method.” On such occasions, the execution engine 18 willattempt to invoke that native method by accessing native methodlibraries 36 through a native method interface 34 (shown in FIG. 2).When the native method returns, the execution engine 18 will continueexecuting the next instruction in the bytecode stream.

When the Java virtual machine 10 runs an application, it needs memory tostore many items, including information it extracts from class files,objects that the program instantiates, parameters to methods, returnvalues, local variables, and intermediate results of computations. TheJava VM 10 organizes the memory it needs to execute a program intoseveral runtime data areas, depicted in FIG. 2. These runtime areas mayinclude a method area 24, a heap 26, one or more Java stacks 28, one ormore program counter (PC) registers 30, and one or more native methodstacks 32. Although the same runtime data areas exist in some form inevery Java VM implementation, the structural details of these areas areleft to the designers of the VM and may therefore vary considerably fromone Java application to another.

Each instance of a Java VM 10 has one method area 24 and one heap 26.These areas are shared by all threads running inside the VM 10. As eachthread comes into existence, it receives its own PC register 30 and Javastack 28. When the VM 10 runs a method contained in a thread, severalthings happen. First, the value of the PC register is used to tell thenext instruction in the method's sequence to execute. Second, thethread's java stack 28 stores the state of each executing Java method ina stack frame, which includes the thread's local variables, theparameters with which it was invoked, its return value if any, andintermediate calculations. When the VM 10 has invoked a method in athread and that method subsequently completes, the VM 10 discards thestack frame for that method from the Java stack 28. The state of nativemethod invocations is stored in the native method stack 32 in a mannerdictated by the designer of the Java VM 10.

Information about loaded data types are parsed from class files as theyare loaded and stored in the method area 24. A data type refers to theformat in which the data is expressed, e.g. an integer, a float, etc. Adata type could also be an address of an op code within a method or areference to an object on the heap 26. The VM 10 uses the typeinformation stored in the method area 24 as it executes the applicationit is running.

For each data type the VM 10 loads, it should store the following kindsof information in the method area: (1) the fully qualified name of thetype; (2) the fully qualified name of the type's superclass; (3) whetheror not the type is a class or an interface; (4) the type's modifiers;(5) an ordered list of the fully qualified names of any directsuperinterfaces; (6) the constant pool for the type; (7) fieldinformation; (8) method information; (9) all class variables declared inthe type except constants; (10) a reference to class CLASSLOADER; and(11) a reference to class CLASS. Each of these kinds of information iswell known to those in the art who design Java virtual machines andprogram in Java.

Referring to FIG. 3, whenever an object 38 is created by a Javaapplication, memory for the new object 38 is stored in the heap 26.Because there is only one heap 26 inside of any instance of a Java VM10, all threads share the heap 26 and because each Java application runsinside its own Java VM 10, there is a separate heap 26 for every Javaapplication running. In this manner, one Java application cannot affectthe objects 38 in the heap 26 of another application. Two differentthreads 40 and 42 of the same application, however, could affect eachother's heap data, i.e. the objects 38. For this reason, synchronizationof the access to objects of multiple threads must be planned.

The existing Java VM 10, as illustrated in FIGS. 1-3 has severaldisadvantages. First, it is inherently redundant. Referring to FIGS. 4Aand 4B, a single computer when running multiple Java applications (orother applications that run in a VM) must create a separate VM for eachapplication. Each VM, in turn, generates its own method area, heap, PCregister, etc., using a good deal of the resources of the underlyingcomputer. This is true even when each VM is running a separate instanceof the same application where many of the objects created by theapplication will be identical. This is illustrated in FIG. 4B wherethree computers 46, 48, and 50 are running the same application 54through a server 52. In this instance, many of the runtime data areasmay be located on the server 52, creating the same kind of redundancy asseen in FIG. 4A.

The redundancy of existing VM systems translates to a loss in systemspeed for two reasons. First, each VM must use its own resources, i.e.time, to load objects already loaded in other applications. Second, thecombined memory space of all VM applications often bottlenecks systemresources. In many cases, the speed at which an application or series ofsimultaneously running applications may operate defines the upper limitof a system's performance—the number of trades processed, web pagesserved, or billing records updated per second. In other words, the speedat which individually well-tuned processes can operate determines howmuch value that system can provide on a second-to second basis, i.e.lost system speed means lost revenue.

The existing wisdom is that the redundancy and the associated loss ofspeed that results from designing every VM application to run in its ownisolated VM 10 is a small price in exchange for the assurance that oneapplication cannot change or otherwise corrupt the data being used byanother application. In addition, the isolation of applications eachwithin its separate VM ensures that if one application should close, orsuddenly crash, the other applications would remain unaffected. Thepresent inventors, though, came to the realization that there are avariety of applications in which the sharing of data across applicationsmight actually be beneficial. In those instances, the redundancy of theexisting system for running VM applications and the associated loss ofsystem speed would be needless.

With this in mind, FIG. 5 shows an improved system for running VMapplications, which broadly stated may comprise a shared object space100 and a native access layer 102 operably connectable with a pluralityof application programming interfaces (API) 104, 106 of independent VMsor other applications such as the C/C++ application 112. The accesslayer 102 permits each application 112, 114, through its associated, API104, 106 to load objects 108 into the shared object space 100 where theobjects 108 may be read and/or modified by the particular applications112, 114. Although in some instances, the individual applications mayduplicate some of the objects 108 stored in the shared object space 100within its own respective heap or other memory area, the shared objectspace 100 permits an application to store an object 108 in the sharedobject space 100 instead of its own heap or other memory area, thusavoiding the redundancy of existing VM systems. Access to the objects108 in the shared object space 100 may be synchronized using the methodsthat presently exist for controlling access to shared objects in a heapby multiple concurrently running threads. Further, the shared objectspace 100 will store an object 108 so long as a thread of any connectedapplication is using the object 108. In this manner, even if theapplication that placed a particular object in the shared object space100 closes or crashes, that object will still be available to otherapplications as necessary. Thus the shared object space 100 permitsmultiple applications running simultaneously on a system or network toenjoy the stability of existing VM systems, while providing asubstantial boost in performance.

The shared object space 100 is accessible to an application through thenative access layer 102. Thus a Java application or other objectoriented application will recognize the shared object space 100 assimply another native method accessible through the interface thatalready exists in Java and other object-oriented applications. Onceaccessed, all the functionality of the shared object space 100 will beinstantly accessible to the connected application. Further, the sharedobject space 100 does not need to be tied to a particular VM, butinstead is backwards compatible with any individual VM, whether it is astandard Java VM provided by Sun Microsystems or a customized VM of aparticular business, and forwards compatible with any VM includingimprovements that have yet to be developed. Thus the versatility of theshared object space 100 can not be overstated. The versatility of theshared object space 100 is furthered by its compatibility with a widevariety of application interfaces. As can be seen in FIG. 5, the nativeaccess layer 102 provides access to the shared object space 100 by bothJava applications and C or C++ applications. It should be understoodthat these examples are illustrative only, and that the native accesslayer 102 could provide access to the shared object space 100 by anumber of other application types, whether object-oriented like Java orcommand oriented like C or C++.

The advantages of the shared object space 100 are readily apparent,particularly with respect to applications that benefit from the abilityof multiple, simultaneously running applications to update a sharedobject rather than simply read or copy a shared object. One suchapplication might be online trading. As the popularity of online tradingincreases, trading exchanges are faced with ever-growing volumes ofmarket data and concurrent trader activity. Systems that were built tohandle moderate volumes now have to handle thousands of traders andbillions of dollars in daily transactions. Such systems have toaccommodate huge spikes in demand. For instance, a single trade mayrequire thousands of traders to be notified. Many traders watch forthese price changes, then jump in to sell or buy very quickly, causingeven more notification demand and more trading volume. The faster atrading system reacts to changes, the more transactions an exchange canexecute, increasing its commissions while maximizing trader satisfactionwith the service.

Another example of the utility of the shared object space 100 might beits potential in improving speed of computerized activity in thetelecommunications industry. Modem telecommunication networks have toprocess vast amounts of data very quickly. Every time a call is placed,for example, an application needs to access the customer's subscriptioninformation, apply any special discounts that may be applicable, monitorthe call duration and establish a rate based on the time and distance tothe terminating number. Given that the number of such calls can run intothe thousands at any given moment, a memory based data sharing facilityis a necessity. In the past, such telecommunications applications havebeen written from scratch in C at enormous expense. The availability ofan off-the-shelf shared memory component that provides a shared objectspace 100 makes it possible to write such systems in Java or anotherobject-oriented program more quickly, cheaply, and with less risk.

Yet another example of the utility of the shared object space 100 is itspotential use in large scale internet applications. Large internetcontent syndication and portal applications depend on fast caching forscalability. The shared object space 100 provides an ideal cachingfacility for HTML and XML fragments, XML DOMs and streams, HTTP sessioninformation, and JDBC query results. It can also hold very fast pagerequest queues and other operational data structures. The shared objectspace 100 may include multi-language support which may be exploited whenconnected to web servers, servlet engines, content management suites,and XML transcoders to speed up every phase of a sites operation.

In use, the shared object space 100 may be one element in a largercomputing system 101. Specifically, it is anticipated that the sharedobject space 100, along with its associated native access layer 102 maybe used in conjunction with a console 118, an administrative processor120, disk storage 122 and a display 124 suitable for displaying systemstatistics. The console 118 is used to configure and start the system101 which may comprise a system manager 126, the shared object space100, and the native access layer 102. The system manager 126 creates andinitializes the shared object space 100, collects garbage, gathersstatistics, and logs both system and user-defined events. Once thesystem 101 has been started, the system manager 126 can also be used tobrowse the shared object space 100, enable statistics collection fromindividual objects, and display the statistics graphically for analysis.

The system 101 is preferably stored on a disk 122 in a defaultdirectory, e.g. “defaultSystem”, that holds the system's configurationfile and log file. The system 101 may be included on an executablestorage media such as a compact disk that include an installation toolthat may be used to create the requisite directories on the disk 122.Additional custom system directories may also be installed on the samedisk 122 as desired. Preferably, the system 101 includes a number ofdefault tools that operate on the default system; however the console118 and a command line utility may allow the user to specify a differentsystem.

To make use of the system 101 and its shared object space 100, thesystem 101 includes a library file in the default directory. Javaapplications should include a reference to this library (e.g.productdir/lib/gemfirejar) on its CLASSPATH. On Windows systems, thelibrary may be made available by adding productDir/bin to PATH and onSolaris, the library can be made available by adding productDir/lib toLD_LIBRARY_PATH. An application process connects to the system 101 bymaking a call that contacts the system manager 126, such as

-   GemFireConnection.myConn=GemFireConnection.getinstance (“Gemfire”).    The system manager 126 then returns information that enables the    application process to map the shared object space 100 into its    address space.

Each system 101 preferably maintains a global name space 116 in theshared object space 100. The name space 116 provides a fast objectregistry in which applications can register and look up “root” objectsby name. Objects that are referenced from this name space are protectedfrom garbage collection. Once connected to the system 101, anapplication can look up shared objects in the name space 116 with acommand such as

-   3 Stock myStock=(Stock) myConn.lookup(“GSI”)

A shared object like myStock always represents a current shared value;that is all threads in all VMs always see the same field values, just asall threads in a single VM see the same volatile field values for anobject in that VM.

-   The statement-   myStock.getPrice( )-   for example, might return the price most recently set by a local or    remote thread, while the statement-   myStock.setPrice(34)-   immediately updates the shared view of myStock's price. Because    these fetches and updates incur no disk or network overhead, they    are much faster than the same operations implemented through    mechanisms like RMI and they outperform JDBC calls by an even wider    margin.

The system 101 may include a Class Enhance tool that prepares anapplication class for sharing by modifying the class's bytecodes toprovide transparent instantiation in shared memory and automaticread-through and write-through for field access methods. By default, allfields may be shared, but a user may establish more selective policiesby providing an XML description of the fields to be shared in eachdomain class. Once a class in enhanced, making an object of that classautomatically puts the object into shared memory.

Referring to FIGS. 6 and 7, the system 101 may support two methods ofsharing objects, copy sharing and direct sharing. An object 128 that iscopy shared is allocated twice, once in the local memory of anapplication and again in shared memory 100. FIG. 6 shows an example of acopy sharing method where application A creates an object 128 in itslocal address space. The object 128 is shared by putting it into theshared name space 116. At this point, the object 128 is not immediatelywritten to a field in the shared object space 100; instead the object128 is written to shared memory 100 only after a user “flushes”, i.e.updates the object to a new version, for the first time. Once an object128 is written to shared memory, application B is able to copy theobject 128 to its local memory by accessing the shared object 128 byname in the shared name space 116. Application B may modify the copy ofthe object 128 obtained from shared memory, but may not update theshared version of the object 128. If application B wishes to see themost recently updated version of the object 128, a refresh command maybe used.

FIG. 7 shows an example of a direct sharing method, which is a one-spacemodel where some of all of the non-static fields of the shared object128 reside only in shared memory. Static fields may be kept in the localheap of an application's VM for performance reasons. An assignment to afield of a directly shared object 128 is immediately visible to threadsof other applications and each application is able to write to theshared object. When the field is read, the current state in sharedmemory 100 is returned; there is no need to refresh the local memory.

FIG. 8 shows another system 201 that includes a shared object space 200within a first Java VM 202. The first Java VM 202 may include all theelements of a typical Java VM as previously described, i.e. a methodarea, a class loader, an execution engine, etc. The heap of the firstJava VM, however, acts as the shared object space 200 so as to beaccessible by the execution engine 204 of a second Java VM. In thesystem 201, the first instance of an application may initiate a VM whoseheap performs as a shared object space for subsequent instances ofapplications operating on the same computer. The shared object space 200may have all the functionality of the shared object space 100 previouslydescribed.

FIG. 9 shows another system 301 in which a shared object space 300resides on a server 302 interconnecting independent computers 304, 306,308 operating on the same or different platforms. Each computer 304,306, and 308 is running a VM instance of a single application that readsand/or writes to data in a database on the server 302. For example, theserver 302 may include a dynamic database for stock prices in a tradingscenario where the connected computers 304, 306, and 308 may be used tocomplete stock transactions through the server using a uniform softwarepackage.

Oftentimes it is desirable to monitor an object space (i.e. monitoringthe state of a memory space, objects in that space, or methods that useobjects in that space) for statistical and other purposes. Two existingmethods of monitoring an object space are typically employed. First,applications are programmed to periodically generate messages concerningthe state of the objects they create, and these messages are then loggedso that statistical data can be gathered relating to the use of thoseobjects. This particular method adversely impacts performance, however,and takes up a large amount of disk and/or memory space; hence thismethod is typically used only for monitoring events that do not lendthemselves to numeric representation. Alternatively, existing operatingsystems compile statistics used for monitoring an object space. Thesestatistics, however, are chosen by the vendor of the operating systemand cannot be easily customized.

In contrast to these existing methods of monitoring an object space, thedisclosed shared object space may be conveniently monitored using aminimal amount of system resources and may be easily customized to suitthe needs of a particular user. Referring to FIG. 10, the disclosedsystem may include a console 402 having a display 404 and an interfacesuch as the alphanumeric keyboard 406 and optionally a mouse 408. Theconsole 402 may be operationally interconnected with an administrativeprocessor 410 and disk storage 412. The console 402 in conjunction withthe administrative processor 406 may be defined as an administrativesystem 401 and used to monitor a shared object space 400 by gatheringstatistics and providing access to the system and a user-defined eventlog, as well as monitoring shared object allocation rates, VMconnections, lock acquisitions, shared queue sizes, and so on. Theadministrative system 401 may also be used to configure and initializethe shared object space 400 and permits an administrative user todynamically discover which particular applications are utilizing theshared object space 400, such as the applications 414, 416, and 418 aswell as to monitor system health, throughput, and other customstatistics enabled by the application data. The administrative system401 also may provide automated alerts for serious problems so that theconsole 402 can be used to take corrective action.

The shared object space 400 may be associated with a distributed groupmanagement system having a distributed cache. In that instance, theadministrative system 401 preferably uses administrative interfaces inthe distributed group management system of the shared object space 400to become an adjunct member of the cache. This allows the administrativesystem 402 to make requests in cache nodes, such as gathering a snapshotof current contents of a distributed cache region, taking correctiveaction on a deadlock alert, gathering statistics for graphing, orrequesting log file contents for display.

The administrative system 401 preferably monitors the shared objectspace 400 so that any data or object, such as 420, 422, 424, or 426, inthe shared object space 400 can be registered with the administrativesystem 401 for statistical monitoring and periodic backup to acompressed file on the disk storage 412. Preferably, the administrativesystem 401 takes a “snapshot” of all registered statistical data onceevery second and transfers that statistical data to the disk storage 412where it can be analyzed later, even after the shared object space 400no longer exists. A selected subset of the “snapshot” can also besimultaneously analyzed visually on the display 404. Alternatively, thefrequency of the monitoring system may be adjustable so that a user cancause the administrative system to record statistical data more or lessfrequently than once per second.

The administrative system 401 preferably provides a framework forgathering application-defined statistics. For example, an applicationcould identify any numeric field in a shared object class as astatistical field. The administrative system 401 may then immediatelysample the field at designated intervals, log the results, and make thenumbers available in a graphical tool on the display 404. For example,if object 424 shown in FIG. 10 as “object R” tracks the number ofmatches performed by a trading system matching engine, that object mightbe registered with the statistics service with the commandGemFireConnectionFactory.getinstance().setStatisticsArchived(tradi-ngStats); after which the administrativesystem 401 will thereafter automatically record the state of “tradingstats” for statistical review at a later time. The aforementionedregistration command is, of course, merely an example of one particularcommand that could be used, and will vary from system to systemdepending on many factors including the programming language used, thename of the shared object space system, etc.

FIG. 11 is a simplified schematic of a system 403 for monitoring objectsin a shared object space 400 where any application (such as applications414, 416, and 418) including an administrative system 401 connected tothe shared object space 400 may define what in the shared object space400 is to be monitored. The system 403 includes a shared object space400 that is being monitored by an administrative system 401 using twomonitors 434 and 436. The number of monitors used may be varied asdesired. The shared object space 400 includes a monitored object space428 that selectively contains any desired number of objects to bemonitored, such as the objects 420 and 432.

In operation, the applications 414, 416, and 418, as well as any otherapplications, including the administrative system 401, connected to theshared object space 400 may insert references to existing shared objectsto be monitored into the monitored object space, such as the objects 430and 432. The objects 430 and 432 are preferably simply references toshared objects, but in other embodiments may duplicate a shared object,such as 420, 422, 424, or 426, or may be a specific field in any of theshared objects in the shared object space 400, or alternatively may becustomized to be data or fields of data that pertains in any way to thestate of any shared object in the shared object space 400. Anapplication may register an object to be monitored in the monitoredobject space in any desired manner, such as by making a single call withthe object to be monitored as the only argument, inserting theregistered monitored object, such as 430 or 432 into the monitoredobject space 428. The size, or capacity, of the monitored object space428 may be any desired portion of the shared object space 400, and maybe variable so as to expand or contract as necessary.

The monitors 434 and 436 each record the state of the data in themonitored object space 428 at a desired frequency. Preferably, thesystem 403 has a default frequency, such as once per second, which maybe adjusted by a user or an application as necessary. The monitors 434and 436, when directed by the administrative system 401, may storerecorded snapshots of the data to storage local to the administrativesystem 401 for graphical display and analysis in the manner previouslydescribed.

As can be easily seen in reference to FIG. 11, the disclosed system formonitoring objects in a shared object space is highly flexible in thatany application using the shared object space 400, or an administrativeuser, has the ability to define data that may be monitored or statisticsto be compiled. This represents a tremendous advantage over existingsystems, such as existing operating systems whereby the vendor of theoperating system defined the set of statistics gathered, which couldthen either not be modified, or only modified after a great deal ofeffort.

The terms and expressions which have been employed in the foregoingspecification are used therein as terms of description and not oflimitation, and there is no intention, in the use of such terms andexpressions, of excluding equivalents of the features shown anddescribed or portions thereof, it being recognized that the scope of theinvention is defined and limited only by the claims which follow.

1. A system for monitoring concurrent operation of plural computerapplications, each said computer application operating in its ownvirtual machine, said system comprising: (a) a memory comprising ashared object space selectively connectable to each of said pluralcomputer applications, said shared object space capable of storing atleast one object accessible by each of said plural computer applicationswhen connected to said shared object space and said shared object spacefurther including a data structure that maintains references to storedobjects in the shared object space that have been registered with thesystem by at least one of the computer applications in order to trackhow said registered objects are being used by said plural computerapplications; and (b) a processing unit configured to periodicallyreceive data from the shared object space, wherein said data relates tohow said registered objects in the data structure are used by saidplural computer applications.
 2. The system of claim 1, wherein at leastone of virtual machines in which the plural computer applicationsoperate is a computing machine as defined by a Java Virtual MachineSpecification.
 3. The system of claim 1, further comprising a datastore, wherein the processing unit is further configured to store thereceived data from the shared object space in the data store for futurestatistical analysis.
 4. The system of claim 1, wherein the processingunit is further configured to receive requests from said plural computerapplications to register objects stored in the shared object space forinclusion in the data structure.
 5. The system of claim 1, wherein theprocessing unit is further configured to determine which of the pluralcomputer applications are currently accessing the shared object space.6. The system of claim 1, wherein the processing unit is furtherconfigured to adjust a frequency of receiving data from the sharedobject space.
 7. The system of claim 1, wherein the processing unit isfurther configured to receive identification from said plural computerapplications of specified data stored in the registered objects forwhich said plural computer applications desire to track.
 8. The systemof claim 1, wherein a heap memory of one of the virtual machines acts asthe shared object space.
 9. The system of claim 1, wherein the sharedobject space is implemented in a native environment of the system andthe virtual machines access the shared object space through a nativeaccess layer.
 10. The system of claim 1, wherein at least one objectstored in the shared object space is a copy of an object stored in alocal memory space of one of the computer applications.
 11. The systemof claim 10, wherein only said one of the computer applications canmodify the at least one stored object and other computer applicationscan only copy the at least one stored object to their own local memoryspace.
 12. The system of claim 1, wherein at least one object stored inthe shared object space can be modified by each of the plural computerapplications.
 13. A method for monitoring concurrent operation of pluralcomputer applications, each said computer application operating in itsown virtual machine, said method comprising: providing a shared objectspace in a memory, wherein the shared object space is selectivelyconnectable to each of the plural computer applications and is capableof storing at least one object accessible by each of the plural computerapplications when connected to the shared object space; maintaining adata structure in the shared object space that maintains references tostored objects in the shared object space that have been registered byat least one of the computer applications in order to track how theregistered objects are being used by the plural computer applications;and periodically receiving data from the shared object space, whereinthe data relates to how the registered objects in the data structure areused by the plural computer applications.
 14. The method of claim 13,wherein at least one of virtual machines in which the plural computerapplications operate is a computing machine as defined by a Java VirtualMachine Specification.
 15. The method of claim 13, further comprisingthe step of storing the received data from the shared object space in adata store for future statistical analysis.
 16. The method of claim 13,further comprising the step of receiving requests from the pluralcomputer applications to register objects stored in the shared objectspace for inclusion in the data structure.
 17. The method of claim 13,further comprising the step of determining which of the plural computerapplications are currently accessing the shared object space.
 18. Themethod of claim 13, further comprising the step of adjusting a frequencyof receiving data from the shared object space.
 19. The method of claim13, further comprising the step of receiving identification from saidplural computer applications of specified data stored in the registeredobjects for which said plural computer applications desire to track. 20.The method of claim 13, wherein a heap memory of one of the virtualmachines acts as the shared object space.
 21. The method of claim 13,wherein the shared object space is implemented in a native environmentof the system and the virtual machines access the shared object spacethrough a native access layer.
 22. The method of claim 13, wherein atleast one object stored in the shared object space is a copy of anobject stored in a local memory space of one of the computerapplications.
 23. The method of claim 22, wherein only said one of thecomputer applications can modify the at least one stored object andother computer applications can only copy the at least one stored objectto their own local memory space.
 24. The method of claim 13, wherein atleast one object stored in the shared object space can be modified byeach of the plural computer applications.
 25. A non-transitorycomputer-readable storage medium including instructions for monitoringconcurrent operation of plural computer applications, each said computerapplication operating in its own virtual machine, said instructions,when executed on a processor, performing the steps of: providing ashared object space in a memory, wherein the shared object space isselectively connectable to each of the plural computer applications andis capable of storing at least one object accessible by each of theplural computer applications when connected to the shared object space;maintaining a data structure in the shared object space that maintainsreferences to stored objects in the shared object space that have beenregistered by at least one of the computer applications in order totrack how the registered objects are being used by the plural computerapplications; and periodically receiving data from the shared objectspace, wherein the data relates to how the registered objects in thedata structure are used by the plural computer applications.
 26. Thenon-transitory computer-readable storage medium of claim 25, wherein atleast one of virtual machines in which the plural computer applicationsoperate is a computing machine operable according to a Java VirtualMachine Specification.
 27. The non-transitory computer-readable storagemedium of claim 25, further comprising instructions that perform thestep of storing the received data from the shared object space in a datastore for future statistical analysis.
 28. The non-transitorycomputer-readable storage medium of claim 25, further comprisinginstructions that perform the step of receiving requests from the pluralcomputer applications to register objects stored in the shared objectspace for inclusion in the data structure.
 29. The non-transitorycomputer-readable storage medium of claim 25, further comprisinginstructions that perform the step of determining which of the pluralcomputer applications are currently accessing the shared object space.30. The non-transitory computer-readable storage medium of claim 25,further comprising instructions that perform the step of adjusting afrequency of receiving data from the shared object space.
 31. Thenon-transitory computer-readable storage medium of claim 25, furthercomprising instructions that perform the step of receivingidentification from said plural computer applications of specified datastored in the registered objects for which said plural computerapplications desire to track.
 32. The non-transitory computer-readablestorage medium of claim 25, wherein a heap memory of one of the virtualmachines acts as the shared object space.
 33. The non-transitorycomputer-readable storage medium of claim 25, wherein the shared objectspace is implemented in a native environment of the system and thevirtual machines access the shared object space through a native accesslayer.
 34. The non-transitory computer-readable storage medium of claim25, wherein at least one object stored in the shared object space is acopy of an object stored in a local memory space of one of the computerapplications.
 35. The non-transitory computer-readable storage medium ofclaim 34, wherein at least one object stored in the shared object spacecan be modified by each of the plural computer applications.
 36. Thenon-transitory computer-readable storage medium of claim 25, wherein atleast one object stored in the shared object space can be modified byeach of the plural computer applications.